package com.prs.crm.dao.official.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.dao.official.FileTransmitDao;
import com.prs.crm.domain.official.FileTransmit;

public class FileTransmitDaoImpl extends BaseDaoImpl<FileTransmit> implements FileTransmitDao{

	@Override
	public FileTransmit getFileTransmitById(final Integer id) {
		Criteria criteria=this.getSession().createCriteria(FileTransmit.class);
		criteria.add(Restrictions.eq("id", id));
		List result=criteria.list();
		if (result==null || result.size()==0) {
			return null;
		}
		return (FileTransmit) result.get(0);
	}

}
